PDF4Java Reference Documentation
com.o2sol.pdf4java.graphics.text Package / PDFTextEngine Class / getStringInBox Method / getStringInBox(String,PDFFont,double,double,boolean) Method
String to wrap in the box.
Font used to draw the string.
The box width.
The box height.
True if long words are wrapped at character level if they do not fit entirely on a single line.
In This Topic
    getStringInBox(String,PDFFont,double,double,boolean) Method
    In This Topic
    Gets the string that fits in the given box.
    Syntax
    public static java.lang.String getStringInBox( 
       java.lang.String s,
       PDFFont font,
       double width,
       double height,
       boolean forceLongWordsWrap
    )

    Parameters

    s
    String to wrap in the box.
    font
    Font used to draw the string.
    width
    The box width.
    height
    The box height.
    forceLongWordsWrap
    True if long words are wrapped at character level if they do not fit entirely on a single line.

    Return Value

    The number of characters in the string that fit in the given box.
    See Also